www.gusucode.com > 中国货源网导航程序源码 1 > 中国货源网导航程序源码 1.0/8月11日备份/search.asp

    <!--#include file="mdb.asp"-->
<%
dim by,word,pn
by=request("by")
word=request("word")
pn=request("pn")
if by="url" then
sql="select * from detail where url like '%"&word&"%'"
else
sql="select * from detail where title like '%"&word&"%'"
end if
%>
<HTML>
<HEAD>
<TITLE>网站搜索结果</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK REL="stylesheet" HREF="css/style.css" TYPE="text/css">
</HEAD>
<BODY>

<table width=760 border=1 align=center cellpadding=0 cellspacing=0 bordercolorlight=#cecece bordercolordark=#ffffff>
<tr>
<td height=25 bgcolor=#ececec colspan=8>&nbsp;<font color=#FF0000>★<B>网站搜索结果</B>★</font> → 你输入的关键字是 → [ <font color=#FF0000><%=word%></font> ]</td></tr>
<tr>
<td width=150 height=30 align=middle><B>网站名称</B></td>
<td align=middle><B>所属分类</B></td>
<td align=middle><B>网站介绍</B></td>
<td align=middle><B>网站url</B></td></tr>
<tr>
<%
if pn="" then pn=1
set r=server.createobject("adodb.recordset")
r.open sql,conn,1,3
if  r.eof or r.bof then
response.write "<td height=25 align=middle colspan=4>在本站没有找到有关 <B>"&word&"</B> 记录的网站!</td></tr>"
response.write "</table>"
response.end
end if
r.pagesize=20
r.absolutepage=pn
rowcount=r.pagesize
do while not r.eof and not r.bof and rowcount>0
set rr=server.createobject("adodb.recordset")
rr.open "select * from feilei where classid="&r("classid"),conn,1,3
response.write "<td height=25 vAlign=top><A HREF=showurl.asp?id="&r("id")&" target=_blank>"&r("title")&"</A></td>"
response.write "<td vAlign=top><font color=#FF0000>"&rr("classname")&"</font></td>"
response.write "<td vAlign=top>  "&r("memo")&"</td>"
response.write "<td vAlign=top>"&r("url")&"</td></TR>"
rr.close                   
set rr=nothing
rowcount=rowcount-1
r.movenext
loop
%>
</table>
</BODY>
</HTML>